package tex.base;

public class Tex {
	private Preamble preamble;
	private Document document;
	/**
	 * @param preamble the preamble to set
	 */
	public void setPreamble(Preamble preamble) {
		this.preamble = preamble;
	}
	/**
	 * @return the preamble
	 */
	public Preamble getPreamble() {
		return preamble;
	}
	/**
	 * @param document the document to set
	 */
	public void setDocument(Document document) {
		this.document = document;
	}
	/**
	 * @return the document
	 */
	public Document getDocument() {
		return document;
	}
	
	@Override
	public String toString() {
		return "(tex\n{preamble: " + preamble + "}\n{document: " + document + "})";
	}
	
	public void generateDocument(StringBuffer buffer) {
		document.generateDocument (buffer, this);
	}
}
